package ProcessControl;

/**
 * @author chihb
 * @create-time 2024/6/19 17:08
 * @description
 */

import java.util.Random;

/**
 * Random类的使用
 * 包左不包右
 */
public class RandomDemo {
    public static void main(String[] args) {
        Random r = new Random();
        int rs = r.nextInt(20);
        long rs1 = r.nextLong(1,2);
        Double rs2 = r.nextDouble(20);
        Boolean rs3 = r.nextBoolean();
        Float rs4 = r.nextFloat(20);
        Double rs5 = r.nextGaussian();

        System.out.println(rs);
    }
}
